@import "./mixin";
@import "./constants";

html, body {
  min-height: 100%;
  height: 100%;
  font-family: Avenir,Helvetica,Arial,sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
}
//header
header {
  position: relative;
  text-align: center;
  z-index: 10;
  background: #fff;
  box-shadow: 0 3px 5px 1px rgba(0, 0, 0, .1);
  .wrapper {
    width: @header_mid;
    height: @header_height;
    margin: 0 auto;
    .icon-box{
      position: absolute;
      display: block;
      left: @common_left_right;
      .hc()
    }
  }
  .icon-box {
    width: 45px;
    height: 45px;
    line-height: 45px;
    border: 1px solid #fff;
    cursor: pointer;
    &>span{
      font-size: 22px;
    }
  }
  .logo {
    height: @logo_height;
    margin-top: (@header_height - @logo_height)/ 2;
  }
  .icon-box, .avatar-box {
    position: absolute;
  }
  .avatar-box {
    height: 40px;
    right: @common_left_right;
    .hc();
    display: flex;
    flex-direction: row;
    cursor: pointer;
    .avatar{
      a{
        display: block;
      }
      img{
        width: 40px;
        height: 40px;
        border-radius: 50%;
      }
    }
    .arrow{
      display: block;
      width: 6px;
      height: 6px;
      margin-top: 16px;
      border-top: 2px solid #9b9b9b;
      border-right: 2px solid #9b9b9b;
      transform: rotate(135deg);
    }
    .icon{
      display: none;
      &.active{
        display: flex;
        margin-left: 10px;
        align-items: center;
      }
    }
  }
  .sign-box{
    position: absolute;
    top: @header_height;
    right: 10px;
    padding: 10px 0;
    background-color: #fff;
    box-shadow: 0 4px 4px #ddd;
    &.hide{
      display: none;
    }
    .item{
      display: flex;
      align-items: center;
      width: 80px;
      height: 50px;
      padding: 0 10px;
      font-size: 14px;
      cursor: pointer;
      .icon{
        margin-right: 10px;
      }
      &:hover{
        background-color: #efefef;
      }
    }
  }
}
//页面主体
.container {
  flex: 1;
  padding-bottom: @footer_btm;
  .content-wrapper{
    padding-top: @content_wrapper_top;
    //顶部
    .top-wrapper{
      &>ul>li{
        position: relative;
        width: 32%;
        height: 120px;
        margin-right: 2%;
        color: white;
        &:not(:last-child){
          display: flex;
          flex-direction: row;
          justify-content: space-between;
          box-sizing: border-box;
          padding: 10px 20px 10px 5px;
          .top{
            padding-left: 5px;
            font-size: 18px;
            font-weight: bold;
          }
          .mid-wrapper{
            position: absolute;
            left: 50%;
            top: -14%;
            transform: translate3d(-50%,0,0);
            .mid>span{
              font-size: 144px;
              opacity: .2;
            }
          }
          .btm{
            display: flex;
            font-size: 48px;
            align-items: flex-end;
          }
        }
        &:nth-child(1){
          position: relative;
          background-color: @orange;
          .mid-wrapper{
            .mid{
              left: 50%;
              animation: rotate 20s linear  infinite;
              @keyframes rotate
              {
                from {transform:rotate(0);}
                to {transform:rotate(360deg);}
              }
            }
          }
        }
        &:nth-child(2){
          background-color: @green;
        }
        &:last-child{
          box-sizing: border-box;
          margin-right: 0;
          padding: 20px;
          background-color: #fff;
          color: #000;
          .tit{
            font-size: 12px;
          }
          .num{
            font-size: 20px;
            font-weight: bold;
          }
        }
      }
    }
    //搜索区域
    .search-bar{
      display: flex;
      align-items: center;
      flex-direction: row;
      margin: @content_wrapper_top 0;
      .filter-wrapper{
        display: flex;
        width: 300px;
        height: 50px;
        align-items: center;
        justify-content: center;
        text-align: center;
        flex-direction: row;
        background-color: #fff;
        .item{
          display: flex;
          align-items: center;
          justify-content: center;
          flex: 1;
          height: 100%;
          border-right: 1px solid #f5f5f5;
          cursor:pointer;
          &.active{
            position: relative;
            color: @blue;
            &:after{
              position: absolute;
              left: 0;
              bottom: 0;
              width: 100%;
              height: 3px;
              content: '';
              background-color: @blue;
            }
          }
        }
      }
      .search-wrapper{
        display: flex;
        flex: 1;
        flex-direction: row;
        justify-content: space-between;
        background-color: #fff;
        .input-wrapper{
          position: relative;
          padding-left: 30px;
          .icon-search{
            position: absolute;
            left: 40px;
            color: #999;
            .hc()
          }
          input{
            height: 30px;
            margin: 10px 0;
            padding-left: 35px;
            outline: none;
            border: none;
            background-color: #f3f3f3;
            box-shadow:2px 2px 2px #e1e4e6 inset;
          }
        }
        .icon-wrapper{
          display: flex;
          align-items: center;
          margin-right: 8px;
          &>span{
            margin-right: 20px;
            cursor: pointer;
          }
          .icon-th-list{
            color: @blue;
          }
        }
      }
    }
    //列表
    .btm-wrapper{
      &>ul>li{
        display: flex;
        height: 80px;
        padding: 10px 20px;
        margin-bottom: @content_wrapper_top;
        flex-direction: row;
        background-color: #fff;
        &.idle{
          .status{
            background-color: @green;
          }
        }
        &.building{
          .status{
            background-color: @orange;
          }
        }
        .img-wrapper{
          display: none;
        }
        .btn-content-wrapper{
          display: flex;
          width: 100%;
          flex-direction: column;
          justify-content: space-between;
          font-size: 14px;
          .top{
            display: flex;
            flex-direction: row;
            .icon{
              margin-right: 8px;
              color: #b7b7b7;
              font-size: 16px;
            }
            .website{
              display: flex;
              align-items: center;
              flex: 1;
              color: @blue;
              font-weight: bold;
              letter-spacing: -0.8px;
              font-size: 12px;
              .status{
                display: inline-block;
                padding: 0 6px;
                margin-left: 20px;
                color: #fff;
                font-weight: normal;
                font-size: 14px;
                letter-spacing: 0;
              }
            }
            .info{
              display: flex;
              flex: 1;
              flex-direction: row;
              .icon{
                margin-right: 10px;
              }
              .ip{
                display: flex;
                align-items: center;
                margin-right: 10px;
              }
              .folder{
                display: flex;
                align-items: center;
                margin-right: 10px;
              }
            }
          }
          .btm{
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            .list{
              display: flex;
              flex-direction: row;
              .add-item{
                display: flex;
                align-items: center;
                justify-content: center;
                flex: 0 0 27px;
                height: 27px;
                margin-right: 10px;
                color: #fff;
                font-size: 18px;
                background-color: @lightblue;
                cursor: pointer;
                &:hover{
                  background-color: @lightblue_hover;
                }
                &>span{
                  display: block;
                }
              }
              .item-list{
                display: flex;
                height:auto;
                align-items: center;
                .item{
                  display: flex;
                  align-items: center;
                  height: 27px;
                  margin-bottom: 10px;
                  padding: 0 6px;
                  margin-right: 10px;
                  background-color: @lightGrey;
                  &:hover{
                    background-color: @lightGrey_hover;
                  }
                  .icon-trash{
                    margin-left: 6px;
                    font-weight: bold;
                    cursor: pointer;
                  }
                }
              }
            }
            .is-deny{
              height: 30px;
              line-height: 30px;
              padding: 0 10px;
              color: #fff;
              background-color: @lightblue;
              cursor: not-allowed;
              &:hover{
                background-color: @lightblue_hover;
              }
              .icon-deny{
                margin-right: 5px;
              }
            }
          }
        }
      }
    }
  }
}
//左边slidebar
.slide-bar {
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: @slide_width;
  height: 100%;
  padding-bottom: 45px;
  padding-top: @header_height;
  background: @deep_gray;
  z-index: 20;
  &.hide{
    display: none;
  }
  &.show{
    display: flex;
  }
  .icon-close{
    position: absolute;
    top: 10px;
    right: 15px;
    color: @lightblue;
    font-size: 20px;
    cursor: pointer;
    &:hover{
      color: @lightblue_hover;
    }
  }
  .list{
    padding-top: 20px;
    color: #fff;
    li{
      height: 45px;
      line-height: 45px;
      cursor: pointer;
      &:hover{
        color: @lightblue;
        background-color: @deep_gray_hover;
        transition: all .2s;
      }
      &>span{
        padding-left: 25px;
        padding-right: 8px;
      }
    }
  }
  .history{
    margin: 0 20px 25px 10px;
    .title{
      margin-bottom: 15px;
      font-size: 24px;
      color: #ccc;
    }
    ul{
      li{
        position: relative;
        margin-bottom: 10px;
        padding-left: 20px;
        cursor: pointer;
        transition: all .3s;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        a{
          font-size: 12px;
          color: #999;
          text-decoration: none;
          &:hover{
            color: @lightblue;
          }
        }
        &:before{
          content: '.';
          position: absolute;
          top: 50%;
          left: 0;
          display: block;
          width: 4px;
          height: 4px;
          border-radius: 50%;
          background-color: #999;
          transform: translateY(-50%);
        }
      }
    }
  }
}
//点击增加的浮层
.layer{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0);
  z-index: 25;
  &.hide{
    display: none;
  }
  .modal-box{
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%,-50%,0);
  }
  .modal{
    position: relative;
    background-color: #fff;
    border: 1px solid @lightblue;
    .modal-content{
      position: relative;
      display: flex;
      flex-direction: column;
      width: 570px;
      padding: 20px 10px 10px 10px;
      font-size: 14px;
      box-shadow: 0 3px 5px rgba(0,0,0,.3);
      z-index: 8;
      .icon-close{
        position: absolute;
        top: 5px;
        right: 15px;
        color: @lightblue;
        font-size: 20px;
        cursor: pointer;
        &:hover{
          color: @lightblue_hover;
        }
      }
      .input{
        margin-top: 10px;
        margin-bottom: 15px;
        padding: 8px 14px;
        color: @lightblue;
        border-radius: 4px;
        border: 1px solid #999;
        box-shadow: 0 0 5px #bbb4b4 inset;
        outline: none;
      }
      .btn-group{
        display: flex;
        flex-direction: row;
        &>div{
          min-width: 60px;
          height: 30px;
          line-height: 30px;
          padding: 0 15px;
          text-align: center;
          color: #fff;
          cursor: pointer;
        }
        .add{
          margin-right: 10px;
          background-color: @lightblue;
          &:hover{
            background-color: @lightblue_hover;
          }
        }
        .cancel{
          background-color: @deep_gray;
          &:hover{
            background-color: @deep_gray_hover;
          }
        }
      }
    }
  }
}
//footer
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: @footer_btm;
  line-height: @footer_btm;
  text-align: center;
  font-size: 14px;
  box-shadow: 0 -3px 5px 1px rgba(0, 0, 0, .1);
  background-color: #fff;
  z-index: 30;
}
